www.gusucode.com > 落叶冰点万能企业网站内容管理系统 V9.1 > 落叶冰点万能企业网站内容管理系统 V9.1\code\inc\Collection-b\Admin_ItemModify.asp

    <%@language=vbscript codepage=936 %>


<%

response.buffer=true
%>
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/function.asp"-->
<!--#include file="Admin_ChkPurview.asp"-->
<%
Dim SqlItem,RsItem,FoundErr,ErrMsg

Dim ItemID,ItemName,WebName,WebUrl,ChannelID,ClassID,SpecialID,LoginType,LoginUrl,LoginPostUrl,LoginUser,LoginPass,LoginFalse,ItemDemo
ItemID=Trim(Request("ItemID"))
If ItemID="" Then
   FoundErr=True
   ErrMsg=ErrMsg & "<br><li>参数错误,项目ID不能为空!</li>"
Else
   ItemID=Clng(ItemID)
End If
If FoundErr<>True Then
   SqlItem ="select ItemID,ItemName,WebName,WebUrl,ChannelID,ClassID,SpecialID,LoginType,LoginUrl,LoginPostUrl,LoginUser,LoginPass,LoginFalse,ItemDemo from Item where ItemID=" & ItemID
   Set RsItem=Server.CreateObject("adodb.recordset")
   RsItem.Open SqlItem,ConnItem,1,1
   If RsItem.Eof And RsItem.Bof  Then
      FoundErr=True
      ErrMsg=ErrMsg & "<br><li>参数错误,没有找到该项目!</li>"
   Else
      ItemName=RsItem("ItemName")
      ItemDemo=RsItem("ItemDemo")
      WebName=RsItem("WebName")
      WebUrl=RsItem("WebUrl")
      ChannelID=RsItem("ChannelID")
      ClassID=RsItem("ClassID")
      SpecialID=RsItem("SpecialID")
      LoginType=RsItem("LoginType")
      LoginUrl=RsItem("LoginUrl")
      LoginPostUrl=RsItem("LoginPostUrl")
      LoginUser=RsItem("LoginUser")
      LoginPass=RsItem("LoginPass")
      LoginFalse=RsItem("LoginFalse")
   End If
   RsItem.Close
   Set RsItem=Nothing
End If

If FoundErr=True Then
   Call WriteErrMsg(ErrMsg)
Else
   Call Main()
End If
'关闭数据库链接
Call CloseConn()
Call CloseConnItem()
%>
<%Sub Main%>
<html>
<head>
<title>采集系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="Admin_Style.css">
<%Call SetChannel()%>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="border">
  <tr> 
    <td height="22" colspan="2" align="center" class="topbg"><strong>采&nbsp;&nbsp;集&nbsp;&nbsp;系&nbsp;&nbsp;统&nbsp;&nbsp;项&nbsp;&nbsp;目&nbsp;&nbsp;管&nbsp;&nbsp;理</td>
  </tr>
  <tr class="tdbg"> 
    <td width="65" height="30"><strong>管理导航:</strong></td>
    <td height="30">项目编辑 >> <a href="Admin_ItemModify.asp?ItemID=<%=ItemID%>"><font color=red>基本设置</font></a> >> <a href="Admin_ItemModify2.asp?ItemID=<%=ItemID%>">列表设置</a> >> <a href="Admin_ItemModify3.asp?ItemID=<%=ItemID%>">链接设置</a> >> <a href="Admin_ItemModify4.asp?ItemID=<%=ItemID%>">正文设置</a> >>  
	<a href="Admin_ItemModify5.asp?ItemID=<%=ItemID%>">采样测试</a> >> <a href="Admin_ItemAttribute.asp?ItemID=<%=ItemID%>">属性设置</a> >> 完成</td>         
  </tr>         
</table>
<br>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="border" >
<form method="post" action="Admin_ItemModify2.asp" name="myform">
    <tr> 
      <td height="22" colspan="2" class="title"> <div align="center"><strong>编 辑 项 目--基 本 设 置</strong></div></td>
    </tr>
    <tr class="tdbg"> 
      <td width="20%" class="tdbg"><strong>项目名称:</strong></td>
      <td class="tdbg" width="75%">
		<input name="ItemName" type="text" size="27" maxlength="30" value="<%=ItemName%>">&nbsp;&nbsp;<font color=red>*</font>如:新浪网-新闻中心 既简单又明了 
      </td>
    </tr>
    <tr class="tdbg"> 
      <td width="20%" class="tdbg"><strong> 所属频道:</strong></td>
      <td class="tdbg" width="75%"><select ID="ChannelID" name="ChannelID" onChange="changelocation(document.myform.ChannelID.options[document.myform.ChannelID.selectedIndex].value)"><%call Admin_ShowChannel_Option(ChannelID)%></select>
      </td>
    </tr>
    <tr class="tdbg"> 
      <td width="20%" class="tdbg"><strong> 所属栏目:</strong></td>
      <td class="tdbg" width="75%"><select name="ClassID" ID="ClassID"><%call Admin_ShowClass_Option(ChannelID,ClassID)%></select>
      </td>
    </tr>
    <tr class="tdbg"> 
      <td width="20%" class="tdbg"><strong> 所属专题:</strong></td>
      <td class="tdbg" width="75%"><%call Admin_ShowSpecial_Option(ChannelID,SpecialID)%>
      </td>
    </tr>
    <tr>
      <td width="20%" class="tdbg"><strong> 网站名称:</strong></td>
      <td class="tdbg" width="75%">
		<input name="WebName" type="text" size="27" maxlength="30" value="<%=WebName%>">
      </td>
    </tr>
    <tr>
      <td width="20%" class="tdbg"><strong> 网站网址:</strong></td>
      <td class="tdbg" width="75%"><input name="WebUrl" type="text" size="49" maxlength="150" value="<%=WebUrl%>">
      </td>
    </tr>
   <tr class="tdbg"> 
      <td width="150" class="tdbg"><strong> 网站登录:</strong></td>
      <td class="tdbg">
		<input type="radio" value="0" name="LoginType" <%if LoginType=0 Then Response.Write "checked"%> onClick="Login.style.display='none'">不需要登录<span lang="en-us">&nbsp;
		</span>
		<input type="radio" value="1" name="LoginType" <%if LoginType=1 Then Response.Write "checked"%> onClick="Login.style.display=''">设置参数

      </td>
    </tr>
   <tr class="tdbg" id="Login" style="<%If LoginType=0 Then Response.write "display:none"%>"> 
      <td width="150" class="tdbg"><strong> 登录参数:</strong></td>
      <td class="tdbg">
        登录地址:<input name="LoginUrl" type="text" size="40" maxlength="150" value="<%=LoginUrl%>"><br>
        提交地址:<input name="LoginPostUrl" type="text" size="40" maxlength="150" value="<%=LoginPostUrl%>"><br>
        用户参数:<input name="LoginUser" type="text" size="30" maxlength="150" value="<%=LoginUser%>"><br>
        密码参数:<input name="LoginPass" type="text" size="30" maxlength="150" value="<%=LoginPass%>"><br> 
		失败信息:<input name="LoginFalse" type="text" size="30" maxlength="150" value="<%=LoginFalse%>"></td>
    </tr>
    <tr class="tdbg"> 
      <td width="20%" class="tdbg"><strong>模板备注:</strong></td>
      <td class="tdbg" width="75%"><textarea name="ItemDemo" cols="49" rows="5"><%=ItemDemo%></textarea></td>
    </tr>
    <tr class="tdbg"> 
      <td colspan="2" align="center" class="tdbg">
        <input name="ItemID" type="hidden" id="ItemID" value="<%=ItemID%>">
        <input name="Action" type="hidden" id="Action" value="SaveEdit">
        <input name="Cancel" type="button" id="Cancel" value=" 返&nbsp;&nbsp;回 " onClick="window.location.href='Admin_ItemStart.asp'" style="cursor: hand;background-color: #cccccc;">
        &nbsp; 
        <input  type="submit" name="Submit" value="下&nbsp;一&nbsp;步" style="cursor: hand;background-color: #cccccc;"></td>
    </tr>
</form>
</table>
<!--#include file="Admin_ItemFoot.asp"-->
</body>         
</html>
<%End  Sub%>









<%











biao="[ND_Article_class]"



dim nnnchhnnn2


dim  i_Class



  function next_cen(pid_list,deepth)



  
set rs=server.CreateObject("adodb.recordset")


  
  
rs.open "select * from "&biao&" where ((deepth="&deepth&" and parent_id_list like '%"&pid_list&"%') and sys_content_type='"&nnnchhnnn&"')  order by orders asc",conn,1,1

if pid_list<>"" then
lista=split(pid_list,",")
numa=ubound(lista)
p_id=cstr(lista(numa))

else

p_id=0

end if



do while  not rs.eof

pid_list222=rs("parent_id_list")&","&rs("id")
deepth222=rs("deepth")+1


    set rs2=server.CreateObject("adodb.recordset")    
rs2.open "select * from "&biao&" where ((deepth="&deepth222&" and parent_id_list like '%"&pid_list222&"%') and sys_content_type='"&nnnchhnnn&"')  order by orders asc",conn,1,1


if rs2.eof then


if pid_list<>"" then
lista=split(pid_list,",")
numa=ubound(lista)
p_id=cstr(lista(numa-1))

else

p_id=0

end if
if p_id=0 then p_id=-1


'response.write "<level1 id="""&rs("id")&""" parentTypeID="""&p_id&""" caption="""&rs("ClassName")&""" PRI=""1"" explain="""&rs("id")&"""/>"&vbcrlf

%>






<%
sssaapp=""
for iiiii1=1 to cint(deepth222)
if iiiii1=cint(deepth222) then

sssaapp=sssaapp&"├"
else
sssaapp=sssaapp&"│"


end if
next


%>


 



arr_class[<%=i_Class%>] = new Array("<%=nnnchhnnn2%>","<%=rs("id")%>","<%=sssaapp&rs("classname")%>");



<%i_Class=i_Class+1%>


<%

if not rs.eof then rs.movenext



if rs.eof or rs.bof then

 'response.write "</level0>"


'call next_cen_class(pid_list222,deepth222)

exit function



else




 
 
need_benji_next=1

end if

else




'response.write "<level0 id="""&rs("id")&"""  parentTypeID="""



'if deepth=0 then response.write "-1" else  response.write p_id


'response.write """ caption="""&rs("ClassName")&"""  PRI=""2"" explain="""&rs("id")&""" >"&vbcrlf

%>

<%
sssaapp=""
for iiiii1=1 to cint(deepth222)
if iiiii1=cint(deepth222) then

sssaapp=sssaapp&"├"
else
sssaapp=sssaapp&"│"


end if
next

%>



arr_class[<%=i_Class%>] = new Array("<%=nnnchhnnn2%>","<%=rs("id")%>","<%=sssaapp&rs("classname")%>");


<%i_Class=i_Class+1%>

 











<%









call next_cen(pid_list222,deepth222)







if not rs.eof then rs.movenext

need_benji_next=1

if rs.eof or rs.bof then

'if deepth<>0  then response.write "</level0>"


'call next_cen_class(pid_list222,deepth222)

exit function


end if











end if


if need_benji_next=0 then

exit do

end if

need_benji_next=0
loop



end function











































































Sub SetChannel
Dim Arr_Channel,i_Channel,i_Special,tmpDepth,i,ArrShowLine(20)
Dim Rs,Sql,ClassID,ClassName,SpecialID,SpecialName
Set Rs=server.createobject("adodb.recordset")
Sql = "select * from ND_channel where lanmu_type='Article' order by clng(orders) ASC"
Rs.Open Sql,Conn,1,1
If Not Rs.Eof Then
   Arr_Channel=Rs.GetRows()
End If
Rs.Close
Set Rs=Nothing

If IsArray(Arr_Channel)= True then
   i_Class=0
   i_Special=0
   For i=0 To Ubound(ArrShowLine)
      ArrShowLine(i)=False
   Next
%>
<script language = "JavaScript">
var count_class;
var count_special;
arr_class = new Array();
arr_special= new Array();
<%
   For i_Channel=0 To Ubound(Arr_Channel,2)
      Set Rs=server.createobject("adodb.recordset")
	  
	  aasss=Arr_Channel(0,i_Channel)
	  
	  
	     Sqlc ="select * from ND_channel where id="&aasss
   Set Rsc1=server.CreateObject("adodb.recordset")   
   Rsc1.Open Sqlc,Conn,1,1  
   
   nnnchhnnn=rsc1("sys_content_type_name")
   nnnchhnnn2=aasss



	  
      Sql = "select * from ND_Article_class where sys_content_type='" & Rsc1("sys_content_type_name") & "'"
      Rs.Open Sql,Conn,1,1
%>
arr_class[<%=i_Class%>] = new Array("<%=Arr_Channel(0,i_Channel)%>","0","请选择栏目");
<%


      i_Class=i_Class+1
call next_cen("",0)





      Set Rs=server.createobject("adodb.recordset")
      Sql = "select * from ND_Article_Special where sys_content_type='" & Rsc1("sys_content_type_name") & "'"
      Rs.Open Sql,Conn,1,1
%>
arr_special[<%=i_Special%>] = new Array("<%=Arr_Channel(0,i_Channel)%>","0","不属于任何专题");
<%
      i_Special=i_Special+1
      If Not Rs.Eof then
         Do While Not Rs.Eof
%>
arr_special[<%=i_Special%>] = new Array("<%=Arr_Channel(0,i_Channel)%>","<%=Rs("ID")%>","<%=Rs("SpecialName")%>");
<% 
            i_Special=i_Special + 1
            Rs.MoveNext
         Loop
      End if
      Rs.Close
      Set Rs=Nothing  
   Next
%>
count_class=<%=i_Class%>;
count_special=<%=i_Special%>;

function changelocation(locationid)
    {
    document.myform.ClassID.length = 0; 
    document.myform.SpecialID.length = 0;
    var locationid=locationid;
    var i;
    for (i=0;i < count_class; i++)
        {
            if (arr_class[i][0] == locationid)
            { 
                document.myform.ClassID.options[document.myform.ClassID.length] = new Option(arr_class[i][2], arr_class[i][1]);
            }        
        }
    for (i=0;i < count_special; i++)
        {
            if (arr_special[i][0] == locationid)
            { 
                document.myform.SpecialID.options[document.myform.SpecialID.length] = new Option(arr_special[i][2], arr_special[i][1]);
            }        
        }
    }    
</script>
<%
End if
End sub
%>